package com.bestcem.xm.award.constant;

import java.util.Arrays;
import java.util.List;

/**
 * 公共常量类
 *
 * @author jie.yao <jie.yao@idiaoyan.com>
 * @version v1.0
 * @date 2021/6/30 14:15
 */
public class Constants {

    /**
     * 负一
     */
    public static final int MINUS_ONE = -1;

    /**
     * 零
     */
    public static final int ZERO = 0;

    /**
     * 一
     */
    public static final int ONE = 1;

    /**
     * int1
     */
    public static final int INT1 = 1;

    /**
     * 十
     */
    public static final int TEN = 10;

    /**
     * 十二
     */
    public static final int TWELVE = 12;

    /**
     * 十六
     */
    public static final int SIXTEEN = 16;

    /**
     * 5ow
     */
    public static final int FIVE_HUNDRED_THOUSAND = 500000;

    /**
     * 5ow
     */
    public static final String FIVE_HUNDRED_THOUSAND_STR = "5ow";


    public static final int TWO_HUNDRED_AND_FIFTY_FIVE = 255;

    /**
     * 长整型 一百
     */
    public static final long LONG_HUNDRED = 100L;

    /**
     * 字符串 负一
     */
    public static final String MINUS_ONE_STRING = "-1";

    /**
     * 字符串 零
     */
    public static final String ZERO_STRING = "0";

    /**
     * 字符串 一
     */
    public static final String ONE_STRING = "1";

    /**
     * 空字符串
     */
    public static final String BLANK = "";

    /**
     * json转换失败
     */
    public static final String JSON_TRANSFORMATION_ERROR = "json转换失败";

    /**
     * 分隔符 |
     */
    public static final String SEPARATE = "|";

    /**
     * 分隔符 -
     */
    public static final String HYPHEN = "-";

    /**
     * 奖励名称最长长度 30
     */
    public static final int AWARD_NAME_MAX_LENGTH = 30;

    /**
     * 单个项目奖励最大数量
     */
    public static final int AWARD_MAX_COUNT_PER_PROJECT = 50;

    /**
     * 兑奖码返回的最大长度
     */
    public static final int AWARD_CODE_MAX = 10000;

    /**
     * 第三方资源申请失败
     */
    public static final String THIRD_PART_REQUEST_ERROR = "第三方资源申请失败";

    /**
     * 资源不存在
     */
    public static final String SOURCE_NOT_FOUND = "资源不存在";

    /**
     * 系统操作id
     */
    public static final String SYS_OP_USER_ID = "ffffffffffffffffffffffff";

    /**
     * 系统操作名
     */
    public static final String SYS_OP_USER_NAME = "系统";

    /**
     * 调用钱包中心更改活动状态 请求:remark 交易内容的最长长度
     */
    public static final int REMARK_MAX = 255;

    /**
     * 七天 单位:毫秒
     * 60s * 60m * 24h * 7d * 1000 = 604800000 ms
     */
    public static final int SEVEN_DAYS_UNIT_MILLIS = 604800000;

    /**
     * oss临时文件过期时间 单位:秒
     * 5 * 60 = 300 s
     */
    public static final long OSS_TEMP_EXPIRE_SECOND = 300;

    /**
     * 短信验证码信息模板
     */
    public static final String SMS_CODE_TEMPLATE = "抽奖验证码%s, 若非本人操作请忽略";

    /**
     * 短信验证码信息模板
     */
    public static final String AWARD_SMS_CODE_TEMPLATE = "验证码%s, 有效期%s分钟, 若非本人操作请忽略";

    /**
     * 短信验证码信息模板，有效期数字，10分钟
     */
    public static final int AWARD_SMS_CODE_TEMPLATE_10MIN = 10;

    /**
     * 一万
     */
    public static final Integer TEN_THOUSAND = 10000;

    /**
     * 红包最小金额
     */
    public static final String MIN_REDPACKET = "0.3";

    /**
     * 红包最大金额
     */
    public static final String MAX_REDPACKET = "200";

    /**
     * count
     */
    public static final String COUNT = "count";

    /**
     * total
     */
    public static final String TOTAL = "total";

    /**
     * pass
     */
    public static final String PASS = "pass";

    /**
     * total.count
     */
    public static final String TOTAL_COUNT = "total.count";

    /**
     * pass.count
     */
    public static final String PASS_COUNT = "pass.count";

    /**
     * totalCount
     */
    public static final String TOTAL_COUNT_ALIAS = "totalCount";

    /**
     * passCount
     */
    public static final String PASS_COUNT_ALIAS = "passCount";

    /**
     * 后缀名 xlsx
     */
    public static final String SUFFIX_XLSX = "xlsx";

    /**
     * 后缀名 xls
     */
    public static final String SUFFIX_XLS = "xls";

    /**
     * 后缀名 csv
     */
    public static final String SUFFIX_CSV = "csv";

    /**
     * 兑奖码文件最大限制 1M
     */
    public static final long AWARD_CODE_FILE_MAX_SIZE = 1048576L;

    /**
     * 奖励奖项等级
     */
    public static final String[] AWARD_LEVELS = {"特等奖", "一等奖", "二等奖", "三等奖", "四等奖", "五等奖", "六等奖", "七等奖", "八等奖"};

    /**
     * 日期格式化
     */
    public static final String DATE_PATTERN = "yyyy/MM/dd HH:mm:ss";

    /**
     * 短信模板 奖项名称
     */
    public static final String SMS_TEMPLATE_AWARD_AWARD_NAME = "奖项名称";

    /**
     * 短信模板 奖项等级
     */
    public static final String SMS_TEMPLATE_AWARD_AWARD_LEVEL = "奖项等级";

    /**
     * 短信模板 兑奖码
     */
    public static final String SMS_TEMPLATE_AWARD_CODE = "兑奖码";

    /**
     * 短信模板 问卷名称
     */
    public static final String SMS_TEMPLATE_QDES_NAME = "问卷名称";

    /**
     * 问卷名称最大长度
     */
    public static final int SMS_TEMPLATE_QDES_NAME_MAX_LENGTH = 10;

    /**
     * 短信模板 项目名称
     */
    public static final String SMS_TEMPLATE_PROJECT_NAME = "项目名称";

    /**
     * 项目名称最大长度
     */
    public static final int SMS_TEMPLATE_PROJECT_NAME_MAX_LENGTH = 10;

    /**
     * 短信模板 系统名称
     */
    public static final String SMS_TEMPLATE_SYSTEM_NAME = "系统名称";

    /**
     * 系统名称最大长度
     */
    public static final int SMS_TEMPLATE_SYSTEM_NAME_MAX_LENGTH = 15;

    /**
     * 默认系统名称
     */
    public static final String SMS_TEMPLATE_DEFAULT_SYSTEM_NAME = "倍市得CEM";

    public static class DrawAwardParamsRule {
        /**
         * 短信模板内容最大长度
         */
        public static final int SMS_CONTENT_MAX_LENGTH = 200;

        /**
         * 错误提示信息
         */
        public static final String SMS_CONTENT_LENGTH_ERROR_MESSAGE = "短信内容最大长度为" + SMS_CONTENT_MAX_LENGTH;

        /**
         * 领奖提示最大长度
         */
        public static final int AWARD_TIP_MAX_LENGTH = 300;

        /**
         * 错误提示信息
         */
        public static final String AWARD_TIP_LENGTH_ERROR_MESSAGE = "领奖提示内容最大长度为" + AWARD_TIP_MAX_LENGTH;

        /**
         * 抽奖奖励兑奖码最大长度
         */
        public static final int AWARD_WIN_CODE_MAX_LENGTH = 30;

        /**
         * 长度错误提示信息
         */
        public static final String AWARD_WIN_CODE_TOO_LONG_MESSAGE = "兑奖码最大长度不得超过" + AWARD_WIN_CODE_MAX_LENGTH;
    }

    /**
     * 定制奖励上传文件类型限制添加
     */
    public static final List<String> CUSTOM_AWARD_ATTACH_FILE_TYPES = Arrays.asList("png", "jpeg", "jpg", "gif", "bmp", "tif", "pcx", "tga", "exif", "fpx", "svg", "psd", "cdr", "pcd", "dxf", "ufo", "eps", "ai", "raw", "WMF", "webp", "avif", "apng", "doc", "docx", "pdf", "xls", "xlsx", "csv", "ppt", "pptx", "txt", "sav", "caj", "rar", "zip", "gzip", "mp4", "mov", "wmv", "avi", "flv", "webm", "3gp", "mp3", "wma", "wav", "amr", "m4a", "aac", "json");

    /**
     * 文件导出excel默认sheet名
     */
    public static final String AWARD_EXCEL_DEFAULT_SHEET_NAME = "sheet1";

    /**
     * Excel默认列宽
     */
    public static final int AWARD_EXCEL_DEFAULT_COLUMN_WIDTH = 15;

    /**
     * 第三方奖励url最大长度
     */
    public static final int REMOTE_AWARD_URL_MAX_LENGTH = 1024;
}
